import request from "@/utils/request.js";

export const listUser = async () => {
    const res = await request.get('/user/list');
    return res.map(e => ({...e, value: e.id, label: e.nickname}))
}


export const fields = [
    {
        prop: 'userId',
        label: '所属用户',
        type: 'remote-select',
        api: listUser,
        width: 120,
    },
    {
        prop: 'keyword',
        label: '关键词',
        type: 'text',
        width: 170,
    },
    {
        prop: 'updateTime',
        label: '最后搜索时间',
        type: 'datetime',
        formHidden: true,
        width: 190,
    }
]